package com.zjl.springmvc.exception;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * 十一、异常处理器
 *
 */
@Controller
public class 概述 {
    @GetMapping("/errorS")
    public String requestGX(Model model){
//        int a=10/0;
        model.addAttribute("ex","无异常");
        return "error/4xx";//设置视图名称 转发到/success请求
    }
}
